<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <div class="box">
        <strong></strong>
        <span>11</span>
        <p>22</p>
        <h3></h3>
    </div>

    <script>

        // previousElementSibling  上一个兄弟元素     previousSibling 上一个兄弟节点
        // nextElementSibling  下一个兄弟元素     nextSibling 下一个兄弟节点


        // sibling 同胞

        var oP = document.querySelector('p') ;
        var prev = oP.previousElementSibling ;
        console.log(prev);

        console.log(oP.nextElementSibling);


        console.log(oP.previousElementSibling.previousElementSibling);

    </script>
    
</body>
</html>